package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.DanhMucBaiVietDao;
import com.tt.fashionWebSite.domain.CapBac;
import com.tt.fashionWebSite.domain.DanhMucBaiViet;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("danhMucBaiViet")
public class DanhMucBaiVietJpaDao extends GenericJpaDao<DanhMucBaiViet, String> implements DanhMucBaiVietDao {
    public DanhMucBaiVietJpaDao(){
        super(DanhMucBaiViet.class);
    }

    @Override
    public List<DanhMucBaiViet> getPostCategory(){
        return getEntityManager().createNamedQuery(DanhMucBaiViet.GET_INFO_CATEGORY, DanhMucBaiViet.class).getResultList();
    }
}
